﻿@model Eqwww.Domain.Models.SystemManage.ModuleModel
@inject Eqwww.App.Identity.UserApp UserApp

@{
    ViewData["Title"] = "Details";
    Layout = "~/Views/Shared/_ManageIndexLayout.cshtml";
}


<div class="mdui-container">
    <div class="mdui-row">
        <div class="mdui-col-xs-12 mdui-col-md-6">

            <div class="mdui-typo-title mdui-p-t-4">基本信息</div>
            <div class="mdui-list">
                <div class="mdui-list-item mdui-ripple">
                    <div class="mdui-list-item-content">
                        <div class="mdui-list-item-text">
                            @Html.DisplayNameFor(model => model.Name)
                        </div>
                        <div class="mdui-list-item-title">
                            @Html.DisplayFor(model => model.Name)
                        </div>
                    </div>
                </div>

                <div class="mdui-list-item mdui-ripple">
                    <div class="mdui-list-item-content">
                        <div class="mdui-list-item-text">
                            @Html.DisplayNameFor(model => model.Code)
                        </div>
                        <div class="mdui-list-item-title">
                            @Html.DisplayFor(model => model.Code)
                        </div>
                    </div>
                </div>

                <div class="mdui-list-item mdui-ripple">
                    <div class="mdui-list-item-content">
                        <div class="mdui-list-item-text">
                            @Html.DisplayNameFor(model => model.ParentId)
                        </div>
                        <div class="mdui-list-item-title">
                            @Html.DisplayFor(model => model.Parent.Name)
                        </div>
                    </div>
                </div>

                <div class="mdui-list-item mdui-ripple">
                    <div class="mdui-list-item-content">
                        <div class="mdui-list-item-text">
                            @Html.DisplayNameFor(model => model.Url)
                        </div>
                        <div class="mdui-list-item-title">
                            @Html.DisplayFor(model => model.Url)
                        </div>
                    </div>
                </div>

                <div class="mdui-list-item mdui-ripple">
                    <div class="mdui-list-item-content">
                        <div class="mdui-list-item-text">
                            @Html.DisplayNameFor(model => model.MenuMark)
                        </div>
                        <div class="mdui-list-item-title">
                            @if (Model.MenuMark == true)
                            {
                                <text>是</text>
                            }
                            else
                            {
                                <text>否</text>
                            }
                        </div>
                    </div>
                </div>

                <div class="mdui-list-item mdui-ripple">
                    <div class="mdui-list-item-content">
                        <div class="mdui-list-item-text">
                            @Html.DisplayNameFor(model => model.SortCode)
                        </div>
                        <div class="mdui-list-item-title">
                            @Html.DisplayFor(model => model.SortCode)
                        </div>
                    </div>
                </div>

                <div class="mdui-list-item mdui-ripple">
                    <div class="mdui-list-item-content">
                        <div class="mdui-list-item-text">
                            @Html.DisplayNameFor(model => model.Icon)
                        </div>
                        <div class="mdui-list-item-title">
                            <i class="mdui-icon material-icons">@Model.Icon</i>
                            @Html.DisplayFor(model => model.Icon)

                        </div>
                    </div>
                </div>

                <div class="mdui-list-item mdui-ripple">
                    <div class="mdui-list-item-content">
                        <div class="mdui-list-item-text">
                            @Html.DisplayNameFor(model => model.ModuleOpenType)
                        </div>
                        <div class="mdui-list-item-title">
                            @Html.DisplayFor(model => model.ModuleOpenType)
                        </div>
                    </div>
                </div>

                <div class="mdui-list-item mdui-ripple">
                    <div class="mdui-list-item-content">
                        <div class="mdui-list-item-text">
                            @Html.DisplayNameFor(model => model.IsSystem)
                        </div>
                        <div class="mdui-list-item-title">
                            @if (Model.IsSystem == true)
                            {
                                <text>是</text>
                            }
                            else
                            {
                                <text>否</text>
                            }
                        </div>
                    </div>
                </div>

            </div>
            <div class="mdui-divider"></div>

        </div>   

        <div class="mdui-col-xs-12 mdui-col-md-6">

            
                <div class="mdui-typo-title mdui-p-t-4">关联策略</div>
                <ul class="mdui-list">
                    @{
                        var strategorys = ViewBag.Strategorys as IEnumerable<Eqwww.Domain.Models.SystemManage.StrategoryModel>;
                    }
                    @if (strategorys != null && strategorys.Count() > 0)
                    {
                        @foreach (var item in strategorys)
                        {
                            <li class="mdui-list-item mdui-ripple">

                                <div class="mdui-list-item-content">
                                    <div class="mdui-list-item-title">
                                        @item.Name
                                                                        @if (item.IsSuper == true)
                                                                        {
                                                                            <sup class="mdui-text-color-theme">SUPER</sup>
                                                                        }
                                                                    </div>
                                    <div class="mdui-list-item-text mdui-list-item-one-line">
                                        @item.Description
                                    </div>
                                </div>
                            </li>
                        }
                    }
                    else
                    {
                        <li class="mdui-list-item mdui-ripple">
                            <div class="mdui-list-item-content mdui-text-color-theme-accent">
                                当前模块未关联任何策略
                            </div>
                        </li>
                    }

                </ul>
                <div class="mdui-divider"></div>
            



        </div>
        
    </div>
</div>





